import type { ComputedRef } from 'vue'
import type { DepartmentInfo } from '@/hooks/department.hook.type.ts'

export interface SearchForm {
  name: string,
  location: string
}

export interface Search {
  form: SearchForm
}

/**********************************************************************************/

export interface Table {
  height: number,
  list: DepartmentInfo[],
  total: number,
  $name: ComputedRef<string>,
  $location: ComputedRef<string>,
  $pageSize: ComputedRef<number>,
  $currentPage: ComputedRef<number>,
  currentDepartment: DepartmentInfo
}

export interface Pagination {
  pageSize: number,
  currentPage: number,
  $total: ComputedRef<number>
}

export enum DialogType {
  Unknown,
  Add,
  Update,
}

export interface Dialog {
  title: string,
  width: number,
  height: number,
  visible: boolean,
  form: DepartmentInfo,
  $currentDepartment: ComputedRef<DepartmentInfo>,
  type: DialogType,
}

